//
//  TTQueryCertificateView.m
//  TaoTuo
//
//  Created by admin on 2019/12/23.
//  Copyright © 2019 admin. All rights reserved.
//

#import "TTQueryCertificateView.h"

@implementation TTQueryCertificateView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        UILabel *label = [UILabel labelWithTitle:@"GIA证书查询" color:UIColorHex(333333) fontSize:15];
        [self addSubview:label];
        [label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(58);
            make.left.mas_equalTo(40);
        }];
        
        _textField = [[UITextField alloc] init];
        [_textField setPlaceholder:@"请输入证书号" lightColor:nil darkColor:nil];
        _textField.textColor = UIColorHex(333333);
        _textField.font = [UIFont systemFontOfSize:15];
        _textField.keyboardType = UIKeyboardTypeNumberPad;
        [self addSubview:_textField];
        [_textField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(label.mas_bottom).mas_offset(20);
            make.left.equalTo(label);
            make.centerX.equalTo(self);
            make.height.mas_equalTo(40);
        }];
        
        UIView *lineView = [[UIView alloc] init];
        lineView.backgroundColor = kSeparatorColor;
        [self addSubview:lineView];
        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.textField.mas_bottom);
            make.left.right.equalTo(self.textField);
            make.height.mas_equalTo(1);
        }];
        
        UILabel *hintLabel = [UILabel labelWithTitle:@"注：GIA为全球钻石数据，查询大约需要5~10秒钟！" color:UIColorHex(EA8F8F) fontSize:11];
        [self addSubview:hintLabel];
        [hintLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(lineView).mas_offset(10);
            make.left.equalTo(lineView);
        }];
        
    }
    return self;
}

- (void)resetView
{
    self.textField.text = nil;
}

#pragma mark - JXCategoryListContentViewDelegate
- (UIView *)listView
{
    return self;
}


@end
